Skip to content

One core picker on every screen, and nine more cores to choose from - #318

Merged
wittywilla merged 2 commits into
masterfrom
claude/wittyplay-cores-05db24
Nov 5, 2026
Merged

wittywilla merged 2 commits into
masterfrom
claude/wittyplay-cores-05db24

Conversation

@wittywilla

Copy link
Copy Markdown
Owner

What

The core picker (web/src/pages/games/CorePicker.tsx): which core plays one game, or a console's games unless a game says otherwise.

  • Each core says what it's good at (Accuracy, Speed or Balanced, and a line), how it draws on this server and where else it runs, whether it needs a BIOS file of the owner's own (and whether one's there), whether it's installed, its licence, and for a game how it has gone there.
  • Choosing one that isn't installed installs it, with the licence in view first and a progress bar (bytes from WittyPlay's new InstallProgress), then uses it.
  • A sheet: from the side on wide screens, from the bottom on a phone. ×, Escape, a controller's B, a remote's Back, or a tap outside closes it. Focus starts on the current choice; Up and Down move between choices.
  • Where: the game page's core line (Change core, or Choose a core for a console with none), replacing the old drop-down; Settings → Consoles & cores, where each console says what plays it, with Change core, replacing the drop-down that only listed installed cores. TV mode uses the same game page.
  • Mid-game: the player's page offers chooseCore() to the game menu (administrators only): the same picker over the game, answering restart, later or none, and saying that in-game saves stay and save states load only in the core that made them. The game menu's row that calls it belongs to the WittyPlay design session's menu work (asked; see below).

Server

  • GET /api/gaming/consoles/{console}/core, and choices on GET /api/gaming/games/{id}/core (its options stay for older clients): every core for the console, installed or not, with strength, about, support (coreSupport), canInstall, recommended, bios, and per-game stats. core_choices.go.
  • GET /api/gaming/cores/{id}/install: {installing, received, total} while an install runs. An older WittyPlay answers installing: false, and the bar has no size.
  • core_notes.go: a line for every core in corebuilds.txt, kept in step by a test; GET /games/consoles gives them as coreAbout.
  • corebuilds.txt: nine new cores, checked per platform with scripts/corebuilds (HEAD requests only). They're offered once WittyPlay has them: Nine more cores, and an install says how far it has got WittyPlay#42.
  • internal/play/cores/gen.go regenerated for InstallProgress only. Regenerating everything from WittyPlay's main also brings Play!'s .bin refusals and an unused import in stream/gen.go, so those stubs are left as they were.
  • Docs: GAMING-API.md "Choosing a core", CLIENT-API.md, SECURITY-ROUTES.md, openapi.json, GAMES.md (the other cores per console), CHANGELOG.

New cores and where each has a build (libretro's build server; FreeBSD has none):

Core Console Win x64 Linux x64 Linux arm64 Linux arm32 macOS x64 macOS arm64
QuickNES NES y y y y y y
bsnes SNES y y y n y y
Gearboy GB y y y y y y
VBA-M GBA y y y y y y
gpSP GBA y y y y y y
Beetle PCE PCE y y y y y y
Beetle SuperGrafx PCE y y y y y y
Beetle Lynx Lynx y y y y y y
RACE NGP y y y n y y

Tested

  • go test -race for internal/server, internal/play/... and scripts/corebuilds, with WittyPlay#42 from a test catalogue (WMS_TEST_CATALOG); new tests for the choices, the BIOS need and the notes table.
  • npx tsc --noEmit, npm run build, CI's node tests (111 pass), npm run test:pads, theme contrast, design tokens and design rules.
  • A private server on port 9911 with WittyPlay#42 and the owner's NES and SNES folders (read-only): the picker on Super Mario Kart's page, installing Mesen-S from it (installed, then chosen for the game, and the game page's core line followed); Settings at phone width (375 px, no sideways scroll), installing LRPS2 with its byte progress shown; TV mode at 1280×720 with the arrow keys, Enter, Back, Escape and a click outside. No screenshots were taken.
  • wittyplay-check with the owner's games: see WittyPlay#42 for bsnes (16 retail games, special chips included).

Not done here

  • The game menu's "Change core" row (WittyPlay web, the player's Core options panel) is the design session's area; until it calls host.chooseCore, switching mid-game goes through the game's page.
  • Saturn and arcade cores: the server has no Saturn or arcade console, so Beetle Saturn, Yabause, Kronos, FBNeo and MAME aren't added.
  • Non-commercial cores (Snes9x, Genesis Plus GX, PicoDrive) aren't added, as the server's rule has it. For the user to decide.

🤖 Generated with Claude Code

The core picker (web/src/pages/games/CorePicker.tsx): which core plays one game, or a console's
games. Each core says what it's good at (accuracy, speed or balanced), how it draws here and
where else it runs, whether it needs a BIOS of the owner's own and whether it's installed.
Choosing one that isn't installed installs it, with its progress, then uses it. A sheet: from
the side on wide screens and from the bottom on a phone; ×, Escape, a controller's B, a remote's
Back or a tap outside closes it, and focus starts on the current choice.

- Game page: "Change core" beside the core that plays it, and "Choose a core" for a console with
  none, replacing the old drop-down under How it plays.
- Settings, Consoles & cores: each console says what plays its games, with "Change core",
  replacing the drop-down that only listed installed cores.
- The player's page offers chooseCore to the game menu, for administrators: the same picker over
  the game, which answers restart, later or none, and says that in-game saves stay and save
  states load only in the core that made them.

Server:
- GET /api/gaming/consoles/{console}/core, and choices on GET /api/gaming/games/{id}/core: every
  core for the console, installed or not, with licence, strength and a line on it, coreSupport,
  canInstall, recommended, a BIOS it can't start without and whether it's here, and for a game
  how each has gone (core_choices.go).
- GET /api/gaming/cores/{id}/install: bytes received and the download's size while an install
  runs, from WittyPlay's new cores.Manager.InstallProgress (stub regenerated; an older module
  answers installing: false).
- core_notes.go: a line for every core in corebuilds.txt, kept in step by a test.
  GET /games/consoles gives them as coreAbout.
- corebuilds.txt: QuickNES, bsnes, Gearboy, VBA-M, gpSP, Beetle PCE, Beetle SuperGrafx, Beetle
  Lynx and RACE, checked against libretro's build server per platform. They're offered once
  WittyPlay's console table has them (wittywilla/WittyPlay, same change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 20:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	CHANGELOG.md
@wittywilla
wittywilla merged commit 312c129 into master Nov 5, 2026
7 checks passed
@wittywilla
wittywilla deleted the claude/wittyplay-cores-05db24 branch November 14, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants